﻿Imports System.Diagnostics.Contracts
Imports FTTK.Services.EventArgs
Imports FTTK.Entities

Namespace FTTK.Services.Interfaces
    ''' <summary>
    ''' Defines interface for Partner Services
    ''' </summary>
    ''' <remarks></remarks>
    <ContractClass(GetType(PartnerServiceContract))>
    Public Interface IPartnerService
        Inherits IBaseService

#Region "Search methods"
#Region "GetRepresentativeCategories"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Gets the representative categories.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent (null for first level categories).</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetRepresentativeCategories(languageId As Integer,
                                              Optional idCategoryParent As Integer? = Nothing) As IEnumerable(Of Entities.Category)
#End If

        ''' <summary>
        ''' Gets the categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Sub GetRepresentativeCategoriesAsync(languageId As Integer,
                                               idCategoryParent As Integer,
                                               userState As Object)

        ''' <summary>
        ''' Gets the categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Sub GetRepresentativeCategoriesAsync(languageId As Integer,
                                              userState As Object)

        ''' <summary>
        ''' Occurs when [get categories completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetRepresentativeCategoriesCompleted(sender As Object, e As GetRepresentativeCategoriesCompletedEventArgs)
#End Region

#Region "GetConceptualCategories"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Gets the conceptual categories.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent (null for first level categories).</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetConceptualCategories(languageId As Integer,
                                        Optional idCategoryParent As Integer? = Nothing) As IEnumerable(Of Entities.Category)
#End If

        ''' <summary>
        ''' Gets the conceptual categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Sub GetConceptualCategoriesAsync(languageId As Integer,
                                        idCategoryParent As Integer,
                                        userState As Object)

        ''' <summary>
        ''' Gets the conceptual categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Sub GetConceptualCategoriesAsync(languageId As Integer,
                                        userState As Object)

        ''' <summary>
        ''' Occurs when [get categories completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetConceptualCategoriesCompleted(sender As Object, e As GetConceptualCategoriesCompletedEventArgs)
#End Region

#Region "GetTags"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method returns most searched tag and most used tag on fotolia website. 
        ''' This method may help you to create a tags cloud. 
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="tagType">Type of the tag:
        ''' <see cref="Fttk.Entities.TagType.Used">TagType.Used</see> : Most used tags to index media
        ''' <see cref="Fttk.Entities.TagType.Searched">TagType.Searched</see> : Most used tags to search for media
        ''' </param>
        ''' <remarks></remarks>
        Function GetTags(ByVal languageId As Integer, ByVal tagType As TagType) As IEnumerable(Of Tag)
#End If

        ''' <summary>
        ''' This method returns most searched tag and most used tag on fotolia website ion async mode. 
        ''' This method may help you to create a tags cloud. 
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="tagType">The type of tag searched ("Used" o "Searched"). 
        ''' Used : Most used tags to index media
        ''' Searched : Most used tags to search for media
        ''' </param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Sub GetTagsAsync(languageId As Integer, tagType As TagType, userState As Object)


        ''' <summary>
        ''' Occurs when GetTagsAsync completed.
        ''' </summary>
        ''' <remarks></remarks>
        Event GetTagsCompleted(sender As Object, e As GetTagsCompletedEventArgs)
#End Region

#Region "GetGalleries"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods returns public galleries for a defined language 
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="thumbnailSize">Gallery thumbnail size.</param>
        ''' <remarks></remarks>
        Function GetGalleries(ByVal languageId As Integer, thumbnailSize As GalleryThumbnailSize) As IEnumerable(Of Gallery)
#End If

        ''' <summary>
        ''' This methods returns public galleries for a defined language in async mode.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="thumbnailSize">Gallery thumbnail size.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Sub GetGalleriesAsync(languageId As Integer, thumbnailSize As GalleryThumbnailSize, userState As Object)

        ''' <summary>
        ''' Occurs when GetGalleriesAsync completed.
        ''' </summary>
        ''' <remarks></remarks>
        Event GetGalleriesCompleted(sender As Object, e As GetGalleriesCompletedEventArgs)
#End Region

#Region "GetSeasonalGalleries"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods returns public galleries for a defined language. 
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="thumbnailSize">Gallery Thumbnail size.</param>
        ''' <param name="themeId">ThemeId if you would like data for a specific ThemeId.</param>
        ''' <remarks></remarks>
        Function GetSeasonalGalleries(ByVal languageId As Integer, thumbnailSize As GalleryThumbnailSize, themeId As Integer?) As IEnumerable(Of GalleryTheme)
#End If

        ''' <summary>
        ''' This methods returns public galleries for a defined language in async mode.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="thumbnailSize">Gallery Thumbnail size.</param>
        ''' <param name="themeId">ThemeId if you would like data for a specific ThemeId.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Sub GetSeasonalGalleriesAsync(languageId As Integer, thumbnailSize As GalleryThumbnailSize, themeId As Integer?, userState As Object)

        ''' <summary>
        ''' Occurs when GetSeasonalGalleriesAsync completed.
        ''' </summary>
        ''' <remarks></remarks>
        Event GetSeasonalGalleriesCompleted(sender As Object, e As GetSeasonalGalleriesCompletedEventArgs)
#End Region

#Region "GetCountries"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method returns Fotolia list of countries. 
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetCountries(ByVal languageId As Integer) As IEnumerable(Of Country)
#End If

        ''' <summary>
        ''' This method returns Fotolia list of countries in async mode. 
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">User state.</param>
        ''' <remarks></remarks>
        Sub GetCountriesAsync(languageId As Integer, userState As Object)

        ''' <summary>
        ''' Occurs when [get countries completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetCountriesCompleted(sender As Object, e As GetCountriesCompletedEventArgs)
#End Region

#Region "GetSearchResults"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods makes possible to search media in fotolia image bank. Full search capabilities are available through the API.
        ''' </summary>
        ''' <param name="request">The search request.</param>
        ''' <param name="numberOfResults">Total number of media that verify search parameters.</param>
        ''' <param name="columns">The desires columns in results collection.</param>
        ''' <param name="useCache">If true the method use cache, otherwise not use cache. Default is false.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetSearchResults(request As SearchRequest,
                                  ByRef numberOfResults As Integer,
                                  Optional columns As SearchResultsColumns = SearchResultsColumns.Base,
                                  Optional useCache As Boolean = False) As IEnumerable(Of Media)
#End If

        ''' <summary>
        ''' This methods makes possible to search media in fotolia image bank. Full search capabilities are available through the API.
        ''' </summary>
        ''' <param name="request">The search request.</param>
        ''' <param name="userState">User state.</param>
        ''' <param name="useCache">If true the method use cache, otherwise not use cache. Default is false.</param>
        ''' <remarks></remarks>
        Sub GetSearchResultsAsync(request As SearchRequest, userState As Object, Optional usecache As Boolean = False)

        ''' <summary>
        ''' This methods makes possible to search media in fotolia image bank. Full search capabilities are available through the API.
        ''' </summary>
        ''' <param name="request">The search request.</param>
        ''' <param name="columns">The desires columns in results collection.</param>
        ''' <param name="userState">user state.</param>
        ''' <param name="useCache">If true the method use cache, otherwise not use cache. Default is false.</param>
        ''' <remarks></remarks>
        Sub GetSearchResultsAsync(request As SearchRequest, columns As SearchResultsColumns, userState As Object, Optional usecache As Boolean = False)

        ''' <summary>
        ''' Occurs when [get search results completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetSearchResultsCompleted(sender As Object, e As GetSearchResultsCompletedEventArgs)
#End Region
#End Region

#Region "Media methods"
#Region "GetMediaData"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method return all information about a media.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetMediaData(mediaId As Integer, languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize) As Media
#End If

        ''' <summary>
        ''' This method return all information about a media in async mode.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetMediaDataAsync(mediaId As Integer, languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize, userState As Object)

        ''' <summary>
        ''' Occurs when [get media data completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetMediaDataCompleted(sender As Object, e As GetMediaDataCompletedEventArgs)
#End Region

#Region "GetBulkMediaData"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method return all information about a media.
        ''' </summary>
        ''' <param name="mediaIds">List of media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetBulkMediaData(mediaIds As IEnumerable(Of Integer), languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize) As IEnumerable(Of Media)

        ''' <summary>
        ''' This method return all information about a media.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetBulkMediaData(mediaId As Integer, languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize) As Media
#End If

        ''' <summary>
        ''' This method return all information about a media in async mode.
        ''' </summary>
        ''' <param name="mediaIds">List of media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetBulkMediaDataAsync(mediaIds As IEnumerable(Of Integer), languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize, userState As Object)

        ''' <summary>
        ''' This method return all information about a media in async mode.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetBulkMediaDataAsync(mediaId As Integer, languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize, userState As Object)

        ''' <summary>
        ''' Occurs when [get media data completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetBulkMediaDataCompleted(sender As Object, e As GetBulkMediaDataCompletedEventArgs)
#End Region

#Region "GetMediaGalleries"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods return galleries associated to a media. 
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetMediaGalleries(mediaId As Integer, languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize) As IEnumerable(Of Gallery)
#End If

        ''' <summary>
        ''' This methods return galleries associated to a media in async mode. 
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetMediaGalleriesAsync(mediaId As Integer, languageId As Integer, thumbnailSize As Entities.SearchThumbnailSize, userState As Object)

        ''' <summary>
        ''' Occurs when [get media galleries completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetMediaGalleriesCompleted(sender As Object, e As GetMediaGalleriesCompletedEventArgs)
#End Region

#Region "GetMediaComp"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method returns comp images. 
        ''' Comp images can ONLY be used to evaluate the image as to suitability for a project, obtain client or internal company approvals, or experiment with layout alternatives. 
        ''' </summary>
        ''' <param name="mediaId">Media ID (ID of the Media whose you want to purchase a license).</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetMediaComp(mediaId As Integer) As Image
#End If

        ''' <summary>
        ''' This method returns comp images in async mode. 
        ''' Comp images can ONLY be used to evaluate the image as to suitability for a project, obtain client or internal company approvals, or experiment with layout alternatives. 
        ''' </summary>
        ''' <param name="mediaId">Media ID (ID of the Media whose you want to purchase a license).</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetMediaCompAsync(mediaId As Integer, userState As Object)

        ''' <summary>
        ''' Occurs when [get media comp completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetMediaCompCompleted(sender As Object, e As GetMediaCompCompletedEventArgs)
#End Region

#Region "GetMediaCompFromMediaUrl"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method retive the bytes array from a Media Comp url.
        ''' </summary>
        ''' <param name="url">Media Comp url.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetMediaCompFromMediaUrl(url As String) As Byte()
#End If

        ''' <summary>
        ''' This method retive the bytes array from a Media Comp url in async mode. 
        ''' </summary>
        ''' <param name="url">Media Comp url.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetMediaCompFromMediaUrlAsync(url As String, userState As Object)

        ''' <summary>
        ''' Occurs when [get media comp completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetMediaCompFromMediaUrlCompleted(sender As Object, e As GetMediaCompFromMediaUrlCompletedEventArgs)
#End Region

#Region "GetHomePageImages"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Gets the home page images.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetHomePageImages(languageId As Integer) As IEnumerable(Of HomeImage)
#End If

        ''' <summary>
        ''' Gets the home page images async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Sub GetHomePageImagesAsync(languageId As Integer, userState As Object)

        ''' <summary>
        ''' Occurs when [get home page images completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetHomePageImagesCompleted(sender As Object, e As GetHomePageImagesCompletedEventArgs)
#End Region
#End Region

#Region "User methods"
#Region "LoginUser"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method allows you to create an authenticated session to be able to use methods which need authentication.
        ''' If the user is autenticated, the method returns true, otherwise the method returns false.
        ''' The class that implements this interface must manage the user session and the session id.
        ''' </summary>
        ''' <param name="username">User Login.</param>
        ''' <param name="password">User Password.</param>
        ''' <returns>The sessionId if the user is autenticated, otherwise Nothing.</returns>
        ''' <remarks></remarks>
        Function LoginUser(username As String, password As String) As String
#End If

        ''' <summary>
        ''' This method allows you to create an authenticated session to be able to use methods which need authentication (in async mode).
        ''' The class that implements this interface must manage the user session and the session id.
        ''' </summary>
        ''' <param name="username">User Login.</param>
        ''' <param name="password">User Password.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks>When the login operation is completed, event <see cref="FTTK.Services.Interfaces.IPartnerService.LoginUserCompleted">LoginUserCompleted</see> is reaised.</remarks>
        Sub LoginUserAsync(username As String, password As String, userState As Object)

        ''' <summary>
        ''' Occurs when [login user completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event LoginUserCompleted(sender As Object, e As LoginUserCompletedEventArgs)

#End Region

#Region "GetUserData"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods return data for logged user.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Function GetUserData(sessionId As String) As UserData
#End If

        ''' <summary>
        ''' This methods return data for logged user (in async mode).
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Sub GetUserDataAsync(sessionId As String, userState As Object)

        ''' <summary>
        ''' Occurs when [get user data completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetUserDataCompleted(sender As Object, e As GetUserDataCompletedEventArgs)
#End Region

#Region "GetUserStats"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods returns statistics for logged user. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Function GetUserStats(sessionId As String) As UserStats
#End If

        ''' <summary>
        ''' This methods returns statistics for logged user. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Sub GetUserStatsAsync(sessionId As String, userState As Object)

        ''' <summary>
        ''' Occurs when [get user stats completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetUserStatsCompleted(sender As Object, e As GetUserStatsCompletedEventArgs)
#End Region

#Region "GetUserGalleries"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods return private galleries for logged user. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Function GetUserGalleries(sessionId As String) As IEnumerable(Of Gallery)
#End If

        ''' <summary>
        ''' This methods return private galleries for logged user in async mode.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Sub GetUserGalleriesAsync(sessionId As String, userState As Object)

        ''' <summary>
        ''' Occurs when [get user galleries completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetUserGalleriesCompleted(sender As Object, e As GetUserGalleriesCompletedEventArgs)
#End Region

#Region "GetUserGalleryMedias"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows to search media in logged user galleries or lightbox. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="galleryId">The gallery id. If not id sent, retrieve the content of the logged user Lightbox.</param>
        ''' <param name="numberOfResults">The total number of results.</param>
        ''' <param name="pageNumber">Page number to display.</param>
        ''' <param name="mediaPerPage">Maximum number of media returned. Valid values: 1 to 64.</param>
        ''' <param name="thumbnailSize">Size of the thumbnail.</param>
        ''' <param name="detailLevel">The detail level.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetUserGalleryMedias(sessionId As String,
                                      galleryId As String,
                                      ByRef numberOfResults As Integer,
                                      Optional pageNumber As Integer = 1,
                                      Optional mediaPerPage As Integer = 32,
                                      Optional thumbnailSize As SearchThumbnailSize = SearchThumbnailSize.Size110,
                                      Optional detailLevel As SearchDetailLevel = SearchDetailLevel.Base) As IEnumerable(Of Media)
#End If

        ''' <summary>
        ''' This methods allows to search media in logged user galleries or lightbox. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="galleryId">The gallery id. If not id sent, retrieve the content of the logged user Lightbox.</param>
        ''' <param name="pageNumber">Page number to display.</param>
        ''' <param name="mediaPerPage">Maximum number of media returned. Valid values: 1 to 64.</param>
        ''' <param name="thumbnailSize">Size of the thumbnail.</param>
        ''' <param name="detailLevel">The detail level.</param>
        ''' <remarks></remarks>
        Sub GetUserGalleryMediasAsync(sessionId As String,
                                      galleryId As String,
                                      userState As Object,
                                      Optional pageNumber As Integer = 1,
                                      Optional mediaPerPage As Integer = 32,
                                      Optional thumbnailSize As SearchThumbnailSize = SearchThumbnailSize.Size110,
                                      Optional detailLevel As SearchDetailLevel = SearchDetailLevel.Base)

        ''' <summary>
        ''' Occurs when [get user gallery medias completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetUserGalleryMediasCompleted(sender As Object, e As GetUserGalleryMediasCompletedEventArgs)
#End Region

#Region "CreateUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Creates a new user gallery.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryName">Name of the gallery.</param>
        ''' <returns>The method returns the gallery id or nothing if gallery isn't created.</returns>
        ''' <remarks></remarks>
        Function CreateUserGallery(sessionId As String, galleryName As String) As String
#End If

        ''' <summary>
        ''' Creates the user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryName">Name of the gallery.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub CreateUserGalleryAsync(sessionId As String, galleryName As String, userState As Object)

        ''' <summary>
        ''' Occurs when [create user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event CreateUserGalleryCompleted(sender As Object, e As CreateUserGalleryCompletedEventArgs)

#End Region

#Region "DeleteUserGallery"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Deletes the user gallery.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryId">Id of the gallery to delete.</param>
        ''' <returns>TRUE if the gallery is deleted, otherwise FALSE.</returns>
        ''' <remarks></remarks>
        Function DeleteUserGallery(ByVal sessionId As String, ByVal galleryId As String) As Boolean
#End If

        ''' <summary>
        ''' Deletes the user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryId">Id of the gallery to delete.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub DeleteUserGalleryAsync(ByVal sessionId As String, ByVal galleryId As String, ByVal userState As Object)

        ''' <summary>
        ''' Occurs when [delete user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event DeleteUserGalleryCompleted(ByVal sender As Object, ByVal e As DeleteUserGalleryCompletedEventArgs)

#End Region

#Region "AddToUserGallery"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows you to add a content to your default lightbox or any of your existing galleries.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <returns><c>true</c> if media is added correctly, otherwise <c>false.</c></returns>
        ''' <remarks></remarks>
        Function AddToUserGallery(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String) As Boolean
#End If

        ''' <summary>
        ''' This methods allows you to add a content to your default lightbox or any of your existing galleries.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub AddToUserGalleryAsync(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String, ByVal userState As Object)

        ''' <summary>
        ''' Occurs when [add to user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event AddToUserGalleryCompleted(ByVal sender As Object, ByVal e As AddToUserGalleryCompletedEventArgs)

#End Region

#Region "RemoveFromUserGallery"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows you to remove a content from your default lightbox or any of your existing galleries. 
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function RemoveFromUserGallery(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String) As Boolean
#End If

        ''' <summary>
        ''' This methods allows you to remove a content from your default lightbox or any of your existing galleries async.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub RemoveFromUserGalleryAsync(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String, ByVal userState As Object)

        ''' <summary>
        ''' Occurs when [remove from user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event RemoveFromUserGalleryCompleted(ByVal sender As Object, ByVal e As RemoveFromUserGalleryCompletedEventArgs)

#End Region

#Region "GetUserAdvancedStats"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="period">Valid values for simple date statistics.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetUserAdvancedStats(ByVal sessionId As String, type As UserStatsType,
                                      range As UserStatsTimeRange, period As UserStatsDatePeriod) As UserAdvancedStats

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="startDate">The start date.</param>
        ''' <param name="enddate">The end date.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function GetUserAdvancedStats(ByVal sessionId As String, type As UserStatsType,
                                      range As UserStatsTimeRange, startDate As DateTime, endDate As DateTime) As UserAdvancedStats
#End If

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account (in async mode). 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="period">Valid values for simple date statistics.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetUserAdvancedStatsAsync(ByVal sessionId As String, type As UserStatsType,
                                      range As UserStatsTimeRange, period As UserStatsDatePeriod,
                                      ByVal userState As Object)

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="startDate">The start date.</param>
        ''' <param name="enddate">The end date.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub GetUserAdvancedStatsAsync(ByVal sessionId As String, type As UserStatsType,
                                      range As UserStatsTimeRange, startDate As DateTime, endDate As DateTime,
                                      ByVal userState As Object)

        ''' <summary>
        ''' Occurs when [get user advanced stats completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event GetUserAdvancedStatsCompleted(ByVal sender As Object, ByVal e As GetUserAdvancedStatsCompletedEventArgs)
#End Region

#Region "MoveUpMediaInUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Move a media up in an user gallery.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Function MoveUpMediaInUserGallery(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String) As Boolean
#End If


        ''' <summary>
        ''' Moves up media in user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub MoveUpMediaInUserGalleryAsync(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String, ByVal userState As Object)


        ''' <summary>
        ''' Occurs when [move up media in user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event MoveUpMediaInUserGalleryCompleted(ByVal sender As Object, ByVal e As MoveUpMediaInUserGalleryCompletedEventArgs)
#End Region

#Region "MoveDownMediaInUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Move a media down in an user gallery.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Function MoveDownMediaInUserGallery(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String) As Boolean
#End If


        ''' <summary>
        ''' Moves down media in user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub MoveDownMediaInUserGalleryAsync(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String, ByVal userState As Object)


        ''' <summary>
        ''' Occurs when [move down media in user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event MoveDownMediaInUserGalleryCompleted(ByVal sender As Object, ByVal e As MoveDownMediaInUserGalleryCompletedEventArgs)
#End Region

#Region "MoveMediaToTopInUserGallery"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Move a media to top in an user gallery.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Function MoveMediaToTopInUserGallery(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String) As Boolean
#End If


        ''' <summary>
        ''' Moves to top media in user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Sub MoveMediaToTopInUserGalleryAsync(ByVal sessionId As String, mediaId As Integer, ByVal galleryId As String, ByVal userState As Object)


        ''' <summary>
        ''' Occurs when [move to top media in user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Event MoveMediaToTopInUserGalleryCompleted(ByVal sender As Object, ByVal e As MoveMediaToTopInUserGalleryCompletedEventArgs)
#End Region

#Region "CreateUser"
        '' TODO  To Add
#End Region

#Region "GetSalesData"
        '' TODO To Add
#End Region
#End Region
    End Interface

    <ContractClassFor(GetType(IPartnerService))>
    Public MustInherit Class PartnerServiceContract
        Implements IPartnerService

#Region "GetRepresentativeCategories"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Gets the representative categories.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent (null for first level categories).</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetRepresentativeCategories(ByVal languageId As Integer,
                                                    Optional ByVal idCategoryParent As Integer? = Nothing) As IEnumerable(Of Category) Implements IPartnerService.GetRepresentativeCategories
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Contract.Requires(Of ArgumentException)(Not idCategoryParent.HasValue OrElse idCategoryParent.Value > 0, "Id Category Parent must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' Gets the categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Public Sub GetRepresentativeCategoriesAsync(ByVal languageId As Integer,
                                                  ByVal idCategoryParent As Integer,
                                                  ByVal userState As Object) Implements IPartnerService.GetRepresentativeCategoriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Contract.Requires(Of ArgumentException)(idCategoryParent > 0, "Id Category Parent must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Gets the categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Public Sub GetRepresentativeCategoriesAsync(ByVal languageId As Integer,
                                                    ByVal userState As Object) Implements IPartnerService.GetRepresentativeCategoriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get categories completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetRepresentativeCategoriesCompleted(ByVal sender As Object, ByVal e As GetRepresentativeCategoriesCompletedEventArgs) Implements IPartnerService.GetRepresentativeCategoriesCompleted
#End Region

#Region "GetConceptualCategories"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Gets the conceptual categories.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent (null for first level categories).</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetConceptualCategories(ByVal languageId As Integer,
                                                    Optional ByVal idCategoryParent As Integer? = Nothing) As IEnumerable(Of Category) Implements IPartnerService.GetConceptualCategories
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Contract.Requires(Of ArgumentException)(Not idCategoryParent.HasValue OrElse idCategoryParent.Value > 0, "Id Category Parent must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' Gets the conceptual categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="idCategoryParent">The id category parent.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Public Sub GetConceptualCategoriesAsync(ByVal languageId As Integer,
                                                  ByVal idCategoryParent As Integer,
                                                  ByVal userState As Object) Implements IPartnerService.GetConceptualCategoriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Contract.Requires(Of ArgumentException)(idCategoryParent > 0, "Id Category Parent must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Gets the conceptual categories async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">State of the user.</param>
        ''' <remarks></remarks>
        Public Sub GetConceptualCategoriesAsync(ByVal languageId As Integer,
                                                    ByVal userState As Object) Implements IPartnerService.GetConceptualCategoriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get categories completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetConceptualCategoriesCompleted(ByVal sender As Object, ByVal e As GetConceptualCategoriesCompletedEventArgs) Implements IPartnerService.GetConceptualCategoriesCompleted
#End Region

#Region "GetTags"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method returns most searched tag and most used tag on fotolia website.
        ''' This method may help you to create a tags cloud.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="tagType">Type of the tag:
        ''' <see cref="Fttk.Entities.TagType.Used">TagType.Used</see> : Most used tags to index media
        ''' <see cref="Fttk.Entities.TagType.Searched">TagType.Searched</see> : Most used tags to search for media</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetTags(ByVal languageId As Integer,
                                ByVal tagType As TagType) As IEnumerable(Of Tag) Implements IPartnerService.GetTags
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This method returns most searched tag and most used tag on fotolia website ion async mode.
        ''' This method may help you to create a tags cloud.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="tagType">The type of tag searched ("Used" o "Searched").
        ''' Used : Most used tags to index media
        ''' Searched : Most used tags to search for media</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Public Sub GetTagsAsync(ByVal languageId As Integer, ByVal tagType As TagType, ByVal userState As Object) Implements IPartnerService.GetTagsAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        Public Event GetTagsCompleted(ByVal sender As Object, ByVal e As GetTagsCompletedEventArgs) Implements IPartnerService.GetTagsCompleted

#End Region

#Region "GetGalleries"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods returns public galleries for a defined language
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetGalleries(ByVal languageId As Integer, thumbnailSize As GalleryThumbnailSize) As IEnumerable(Of Gallery) Implements IPartnerService.GetGalleries
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods returns public galleries for a defined language in async mode.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Public Sub GetGalleriesAsync(ByVal languageId As Integer, thumbnailSize As GalleryThumbnailSize, ByVal userState As Object) Implements IPartnerService.GetGalleriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when GetGalleriesAsync completed.
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetGalleriesCompleted(ByVal sender As Object, ByVal e As GetGalleriesCompletedEventArgs) Implements IPartnerService.GetGalleriesCompleted

#End Region

#Region "GetSeasonalGalleries"
#If SILVERLIGHT = 0 Then
       
        ''' <summary>
        ''' This methods returns public galleries for a defined language.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="themeId">ThemeId if you would like data for a specific ThemeId.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetSeasonalGalleries(languageId As Integer, thumbnailSize As GalleryThumbnailSize, themeId As Integer?) As System.Collections.Generic.IEnumerable(Of Entities.GalleryTheme) Implements IPartnerService.GetSeasonalGalleries
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If
        
        ''' <summary>
        ''' This methods returns public galleries for a defined language in async mode.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="themeId">ThemeId if you would like data for a specific ThemeId.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Public Sub GetSeasonalGalleriesAsync(languageId As Integer, thumbnailSize As GalleryThumbnailSize, themeId As Integer?, userState As Object) Implements IPartnerService.GetSeasonalGalleriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when GetSeasonalGalleriesAsync completed.
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetSeasonalGalleriesCompleted(sender As Object, e As EventArgs.GetSeasonalGalleriesCompletedEventArgs) Implements IPartnerService.GetSeasonalGalleriesCompleted
#End Region

#Region "GetCountries"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method returns Fotolia list of countries.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetCountries(ByVal languageId As Integer) As IEnumerable(Of Country) Implements IPartnerService.GetCountries
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This method returns Fotolia list of countries in async mode.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">User state.</param>
        ''' <remarks></remarks>
        Public Sub GetCountriesAsync(ByVal languageId As Integer, ByVal userState As Object) Implements IPartnerService.GetCountriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get countries completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetCountriesCompleted(ByVal sender As Object, ByVal e As GetCountriesCompletedEventArgs) Implements IPartnerService.GetCountriesCompleted
#End Region

#Region "GetSearchResults"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods makes possible to search media in fotolia image bank. Full search capabilities are available through the API.
        ''' </summary>
        ''' <param name="request">The search request.</param>
        ''' <param name="numberOfResults">Total number of media that verify search parameters.</param>
        ''' <param name="columns">The desires columns in results collection.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetSearchResults(ByVal request As SearchRequest,
                                         ByRef numberOfResults As Integer,
                                         Optional ByVal columns As SearchResultsColumns = SearchResultsColumns.Base,
                                         Optional useCache As Boolean = False) As IEnumerable(Of Media) Implements IPartnerService.GetSearchResults
            Contract.Requires(Of ArgumentNullException)(request IsNot Nothing, "request must be not null!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods makes possible to search media in fotolia image bank. Full search capabilities are available through the API.
        ''' </summary>
        ''' <param name="request">The search request.</param>
        ''' <param name="userState">User state.</param>
        ''' <remarks></remarks>
        Public Sub GetSearchResultsAsync(ByVal request As SearchRequest,
                                         ByVal userState As Object,
                                         Optional useCache As Boolean = False) Implements IPartnerService.GetSearchResultsAsync
            Contract.Requires(Of ArgumentNullException)(request IsNot Nothing, "request must be not null!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' This methods makes possible to search media in fotolia image bank. Full search capabilities are available through the API.
        ''' </summary>
        ''' <param name="request">The search request.</param>
        ''' <param name="columns">The desires columns in results collection.</param>
        ''' <param name="userState">user state.</param>
        ''' <remarks></remarks>
        Public Sub GetSearchResultsAsync(ByVal request As SearchRequest,
                                         ByVal columns As SearchResultsColumns,
                                         ByVal userState As Object,
                                         Optional useCache As Boolean = False) Implements IPartnerService.GetSearchResultsAsync
            Contract.Requires(Of ArgumentNullException)(request IsNot Nothing, "request must be not null!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get search results completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetSearchResultsCompleted(ByVal sender As Object, ByVal e As GetSearchResultsCompletedEventArgs) Implements IPartnerService.GetSearchResultsCompleted
#End Region

#Region "GetMediaData"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method return all information about a media.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetMediaData(ByVal mediaId As Integer,
                                     ByVal languageId As Integer,
                                     ByVal thumbnailSize As SearchThumbnailSize) As Media Implements IPartnerService.GetMediaData
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This method return all information about a media in async mode.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetMediaDataAsync(ByVal mediaId As Integer, ByVal languageId As Integer, ByVal thumbnailSize As SearchThumbnailSize, ByVal userState As Object) Implements IPartnerService.GetMediaDataAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get media data completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetMediaDataCompleted(ByVal sender As Object, ByVal e As GetMediaDataCompletedEventArgs) Implements IPartnerService.GetMediaDataCompleted

#End Region

#Region "GetBulkMediaData"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method return all information about a media.
        ''' </summary>
        ''' <param name="mediaIds">List of media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetBulkMediaData(ByVal mediaIds As IEnumerable(Of Integer), ByVal languageId As Integer, ByVal thumbnailSize As SearchThumbnailSize) As IEnumerable(Of Media) Implements IPartnerService.GetBulkMediaData
            Contract.Requires(Of ArgumentException)(mediaIds IsNot Nothing, "mediaIds must be not null!!")
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Throw New NotImplementedException()
        End Function

        ''' <summary>
        ''' This method return all information about a media.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetBulkMediaData(ByVal mediaId As Integer, ByVal languageId As Integer, ByVal thumbnailSize As SearchThumbnailSize) As Media Implements IPartnerService.GetBulkMediaData
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This method return all information about a media in async mode.
        ''' </summary>
        ''' <param name="mediaIds">List of media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetBulkMediaDataAsync(ByVal mediaIds As IEnumerable(Of Integer), ByVal languageId As Integer, ByVal thumbnailSize As SearchThumbnailSize, ByVal userState As Object) Implements IPartnerService.GetBulkMediaDataAsync
            Contract.Requires(Of ArgumentException)(mediaIds IsNot Nothing, "mediaIds must be not null!!")
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' This method return all information about a media in async mode.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetBulkMediaDataAsync(ByVal mediaId As Integer, ByVal languageId As Integer, ByVal thumbnailSize As SearchThumbnailSize, ByVal userState As Object) Implements IPartnerService.GetBulkMediaDataAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get bulk media data completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetBulkMediaDataCompleted(ByVal sender As Object, ByVal e As GetBulkMediaDataCompletedEventArgs) Implements IPartnerService.GetBulkMediaDataCompleted

#End Region

#Region "GetMediaGalleries"
#If SILVERLIGHT = 0 Then

        ''' <summary>
        ''' This methods return galleries associated to a media.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetMediaGalleries(ByVal mediaId As Integer,
                                          ByVal languageId As Integer,
                                          ByVal thumbnailSize As SearchThumbnailSize) As IEnumerable(Of Gallery) Implements IPartnerService.GetMediaGalleries
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")

            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods return galleries associated to a media in async mode.
        ''' </summary>
        ''' <param name="mediaId">Media id.</param>
        ''' <param name="languageId">Language Id.</param>
        ''' <param name="thumbnailSize">Thumbnail size.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetMediaGalleriesAsync(ByVal mediaId As Integer, ByVal languageId As Integer, ByVal thumbnailSize As SearchThumbnailSize, ByVal userState As Object) Implements IPartnerService.GetMediaGalleriesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "languageId must be grater then zero!")
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")

            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get media galleries completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetMediaGalleriesCompleted(ByVal sender As Object, ByVal e As GetMediaGalleriesCompletedEventArgs) Implements IPartnerService.GetMediaGalleriesCompleted


#End Region

#Region "GetMediaComp"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method returns comp images.
        ''' Comp images can ONLY be used to evaluate the image as to suitability for a project, obtain client or internal company approvals, or experiment with layout alternatives.
        ''' </summary>
        ''' <param name="mediaId">Media ID (ID of the Media whose you want to purchase a license).</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetMediaComp(ByVal mediaId As Integer) As Image Implements IPartnerService.GetMediaComp
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This method returns comp images in async mode.
        ''' Comp images can ONLY be used to evaluate the image as to suitability for a project, obtain client or internal company approvals, or experiment with layout alternatives.
        ''' </summary>
        ''' <param name="mediaId">Media ID (ID of the Media whose you want to purchase a license).</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetMediaCompAsync(ByVal mediaId As Integer, ByVal userState As Object) Implements IPartnerService.GetMediaCompAsync
            Contract.Requires(Of ArgumentException)(mediaId > 0, "mediaId must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get media comp completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetMediaCompCompleted(ByVal sender As Object, ByVal e As GetMediaCompCompletedEventArgs) Implements IPartnerService.GetMediaCompCompleted
#End Region

#Region "GetMediaCompFromMediaUrl"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method retive the bytes array from a Media Comp url.
        ''' </summary>
        ''' <param name="url">Media Comp url.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetMediaCompFromMediaUrl(ByVal url As String) As Byte() Implements IPartnerService.GetMediaCompFromMediaUrl
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(url), "Url must be not null")
            Throw New NotImplementedException()
        End Function
#End If
        ''' <summary>
        ''' This method retive the bytes array from a Media Comp url in async mode. 
        ''' </summary>
        ''' <param name="url">Media Comp url.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetMediaCompFromMediaUrlAsync(ByVal url As String, ByVal userState As Object) Implements IPartnerService.GetMediaCompFromMediaUrlAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(url), "Url must be not null")
            Throw New NotImplementedException()
        End Sub

        Public Event GetMediaCompFromMediaUrlCompleted(ByVal sender As Object, ByVal e As EventArgs.GetMediaCompFromMediaUrlCompletedEventArgs) Implements IPartnerService.GetMediaCompFromMediaUrlCompleted

#End Region

#Region "GetHomePageImages"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Gets the home page images.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetHomePageImages(ByVal languageId As Integer) As IEnumerable(Of HomeImage) Implements IPartnerService.GetHomePageImages
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' Gets the home page images async.
        ''' </summary>
        ''' <param name="languageId">The language id.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks></remarks>
        Public Sub GetHomePageImagesAsync(ByVal languageId As Integer, ByVal userState As Object) Implements IPartnerService.GetHomePageImagesAsync
            Contract.Requires(Of ArgumentException)(languageId > 0, "Language Id must be grater then zero!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [get home page images completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event GetHomePageImagesCompleted(ByVal sender As Object, ByVal e As GetHomePageImagesCompletedEventArgs) Implements IPartnerService.GetHomePageImagesCompleted
#End Region

#Region "LoginUser"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This method allows you to create an authenticated session to be able to use methods which need authentication.
        ''' If the user is autenticated, the method returns true, otherwise the method returns false.
        ''' The class that implements this interface must manage the user session and the session id.
        ''' </summary>
        ''' <param name="username">User Login.</param>
        ''' <param name="password">User Password.</param>
        ''' <returns>True if the user is autenticated, otherwise False.</returns>
        ''' <remarks></remarks>
        Public Function LoginUser(ByVal username As String, ByVal password As String) As String Implements IPartnerService.LoginUser
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(username), "Username must be not null!")
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(password), "Password must be not null!")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This method allows you to create an authenticated session to be able to use methods which need authentication (in async mode).
        ''' The class that implements this interface must manage the user session and the session id.
        ''' </summary>
        ''' <param name="username">User Login.</param>
        ''' <param name="password">User Password.</param>
        ''' <param name="userState">The user state.</param>
        ''' <remarks>When the login operation is completed, event <see cref="FTTK.Services.Interfaces.IPartnerService.LoginUserCompleted">LoginUserCompleted</see> is reaised.</remarks>
        Public Sub LoginUserAsync(ByVal username As String, ByVal password As String, ByVal userState As Object) Implements IPartnerService.LoginUserAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(username), "Username must be not null!")
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(password), "Password must be not null!")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [login user completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event LoginUserCompleted(ByVal sender As Object, ByVal e As LoginUserCompletedEventArgs) Implements IPartnerService.LoginUserCompleted

#End Region

#Region "GetUserData"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods return data for logged user.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Function GetUserData(ByVal sessionId As String) As UserData Implements IPartnerService.GetUserData
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods return data for logged user (in async mode).
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Sub GetUserDataAsync(ByVal sessionId As String, ByVal userState As Object) Implements IPartnerService.GetUserDataAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event GetUserDataCompleted(ByVal sender As Object, ByVal e As GetUserDataCompletedEventArgs) Implements IPartnerService.GetUserDataCompleted
#End Region

#Region "GetUserStats"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods returns statistics for logged user. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Function GetUserStats(ByVal sessionId As String) As UserStats Implements IPartnerService.GetUserStats
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods returns statistics for logged user. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Sub GetUserStatsAsync(ByVal sessionId As String, ByVal userState As Object) Implements IPartnerService.GetUserStatsAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event GetUserStatsCompleted(ByVal sender As Object, ByVal e As GetUserStatsCompletedEventArgs) Implements IPartnerService.GetUserStatsCompleted

#End Region

#Region "GetUserGalleries"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods return private galleries for logged user. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Function GetUserGalleries(ByVal sessionId As String) As IEnumerable(Of Gallery) Implements IPartnerService.GetUserGalleries
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods return private galleries for logged user in async mode.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Sub GetUserGalleriesAsync(ByVal sessionId As String, ByVal userState As Object) Implements IPartnerService.GetUserGalleriesAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event GetUserGalleriesCompleted(ByVal sender As Object, ByVal e As GetUserGalleriesCompletedEventArgs) Implements IPartnerService.GetUserGalleriesCompleted

#End Region

#Region "GetUserGalleryMedias"

#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows to search media in logged user galleries or lightbox. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="galleryId">The gallery id. If not id sent, retrieve the content of the logged user Lightbox.</param>
        ''' <param name="numberOfResults">The total number of results.</param>
        ''' <param name="pageNumber">Page number to display.</param>
        ''' <param name="mediaPerPage">Maximum number of media returned. Valid values: 1 to 64.</param>
        ''' <param name="thumbnailSize">Size of the thumbnail.</param>
        ''' <param name="detailLevel">The detail level.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetUserGalleryMedias(sessionId As String,
                                             galleryId As String,
                                             ByRef numberOfResults As Integer,
                                             Optional pageNumber As Integer = 1,
                                             Optional mediaPerPage As Integer = 32,
                                             Optional thumbnailSize As Entities.SearchThumbnailSize = Entities.SearchThumbnailSize.Size110,
                                             Optional detailLevel As Entities.SearchDetailLevel = Entities.SearchDetailLevel.Base) As System.Collections.Generic.IEnumerable(Of Entities.Media) Implements IPartnerService.GetUserGalleryMedias
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentException)(pageNumber > 0, "PageNumber must be grater then 0")
            Contract.Requires(Of ArgumentException)(mediaPerPage > 0 And mediaPerPage <= 64, "MediaPerPAge must be between 1 and 64")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods allows to search media in logged user galleries or lightbox. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="galleryId">The gallery id. If not id sent, retrieve the content of the logged user Lightbox.</param>
        ''' <param name="userState">The object user state.</param>
        ''' <param name="pageNumber">Page number to display.</param>
        ''' <param name="mediaPerPage">Maximum number of media returned. Valid values: 1 to 64.</param>
        ''' <param name="thumbnailSize">Size of the thumbnail.</param>
        ''' <param name="detailLevel">The detail level.</param>
        ''' <remarks></remarks>
        Public Sub GetUserGalleryMediasAsync(sessionId As String,
                                              galleryId As String,
                                              userState As Object,
                                              Optional pageNumber As Integer = 1,
                                              Optional mediaPerPage As Integer = 32,
                                              Optional thumbnailSize As SearchThumbnailSize = SearchThumbnailSize.Size110,
                                              Optional detailLevel As SearchDetailLevel = SearchDetailLevel.Base) Implements IPartnerService.GetUserGalleryMediasAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentException)(pageNumber > 0, "PageNumber must be grater then 0")
            Contract.Requires(Of ArgumentException)(mediaPerPage > 0 And mediaPerPage <= 64, "MediaPerPAge must be between 1 and 64")
            Throw New NotImplementedException()
        End Sub

        Public Event GetUserGalleryMediasCompleted(ByVal sender As Object, ByVal e As GetUserGalleryMediasCompletedEventArgs) Implements IPartnerService.GetUserGalleryMediasCompleted
#End Region

#Region "CreateUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Creates a new user gallery.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryName">Name of the gallery. Max 32 chars.</param>
        ''' <returns>The method returns the gallery id or nothing if gallery isn't created.</returns>
        ''' <remarks></remarks>
        Public Function CreateUserGallery(ByVal sessionId As String, ByVal galleryName As String) As String Implements IPartnerService.CreateUserGallery
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(galleryName), "GalleryName must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' Creates the user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryName">Name of the gallery.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub CreateUserGalleryAsync(ByVal sessionId As String, ByVal galleryName As String, ByVal userState As Object) Implements IPartnerService.CreateUserGalleryAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(galleryName), "GalleryName must be not null")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [create user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event CreateUserGalleryCompleted(ByVal sender As Object, ByVal e As CreateUserGalleryCompletedEventArgs) Implements IPartnerService.CreateUserGalleryCompleted

#End Region

#Region "DeleteUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Deletes the user gallery.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryId">Id of the gallery to delete.</param>
        ''' <returns>TRUE if the gallery is deleted, otherwise FALSE.</returns>
        ''' <remarks></remarks>
        Public Function DeleteUserGallery(ByVal sessionId As String, ByVal galleryId As String) As Boolean Implements IPartnerService.DeleteUserGallery
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(galleryId), "GalleryId must be not null")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' Deletes the user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="galleryId">Id of the gallery to delete.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub DeleteUserGalleryAsync(ByVal sessionId As String, ByVal galleryId As String, ByVal userState As Object) Implements IPartnerService.DeleteUserGalleryAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(galleryId), "GalleryId must be not null")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' Occurs when [delete user gallery completed].
        ''' </summary>
        ''' <remarks></remarks>
        Public Event DeleteUserGalleryCompleted(ByVal sender As Object, ByVal e As DeleteUserGalleryCompletedEventArgs) Implements IPartnerService.DeleteUserGalleryCompleted

#End Region

#Region "AddToUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows you to add a content to your default lightbox or any of your existing galleries.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <returns><c>true</c> if media is added correctly, otherwise <c>false.</c></returns>
        ''' <remarks></remarks>
        Public Function AddToUserGallery(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String) As Boolean Implements IPartnerService.AddToUserGallery
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods allows you to add a content to your default lightbox or any of your existing galleries.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub AddToUserGalleryAsync(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String, ByVal userState As Object) Implements IPartnerService.AddToUserGalleryAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event AddToUserGalleryCompleted(ByVal sender As Object, ByVal e As AddToUserGalleryCompletedEventArgs) Implements IPartnerService.AddToUserGalleryCompleted

#End Region

#Region "RemoveFromUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows you to remove a content from your default lightbox or any of your existing galleries. 
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function RemoveFromUserGallery(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String) As Boolean Implements IPartnerService.RemoveFromUserGallery
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods allows you to remove a content from your default lightbox or any of your existing galleries async.
        ''' </summary>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="mediaId">The media id.</param>
        ''' <param name="galleryId">The gallery id.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub RemoveFromUserGalleryAsync(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String, ByVal userState As Object) Implements IPartnerService.RemoveFromUserGalleryAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event RemoveFromUserGalleryCompleted(ByVal sender As Object, ByVal e As RemoveFromUserGalleryCompletedEventArgs) Implements IPartnerService.RemoveFromUserGalleryCompleted

#End Region

#Region "GetUserAdvancedStats"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="period">Valid values for simple date statistics.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetUserAdvancedStats(ByVal sessionId As String, ByVal type As UserStatsType, ByVal range As UserStatsTimeRange, ByVal period As UserStatsDatePeriod) As UserAdvancedStats Implements IPartnerService.GetUserAdvancedStats
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="startDate">The start date.</param>
        ''' <param name="endDate">The end date.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function GetUserAdvancedStats(ByVal sessionId As String, ByVal type As UserStatsType, ByVal range As UserStatsTimeRange, ByVal startDate As Date, ByVal endDate As Date) As UserAdvancedStats Implements IPartnerService.GetUserAdvancedStats
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentException)(startDate <= endDate, "StartDate must be less than End Date.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account (in async mode). 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="period">Valid values for simple date statistics.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetUserAdvancedStatsAsync(ByVal sessionId As String, ByVal type As UserStatsType, ByVal range As UserStatsTimeRange, ByVal period As UserStatsDatePeriod, ByVal userState As Object) Implements IPartnerService.GetUserAdvancedStatsAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="type">Type of data to retrieve.</param>
        ''' <param name="range">Group by clause.</param>
        ''' <param name="startDate">The start date.</param>
        ''' <param name="endDate">The end date.</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub GetUserAdvancedStatsAsync(ByVal sessionId As String, ByVal type As UserStatsType, ByVal range As UserStatsTimeRange, ByVal startDate As Date, ByVal endDate As Date, ByVal userState As Object) Implements IPartnerService.GetUserAdvancedStatsAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Contract.Requires(Of ArgumentException)(startDate <= endDate, "StartDate must be less than End Date.")
            Throw New NotImplementedException()
        End Sub

        Public Event GetUserAdvancedStatsCompleted(ByVal sender As Object, ByVal e As GetUserAdvancedStatsCompletedEventArgs) Implements IPartnerService.GetUserAdvancedStatsCompleted

#End Region

#Region "MoveUpMediaInUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Move a media up in an user gallery.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Function MoveUpMediaInUserGallery(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String) As Boolean Implements IPartnerService.MoveUpMediaInUserGallery
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' Moves up media in user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub MoveUpMediaInUserGalleryAsync(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String, ByVal userState As Object) Implements IPartnerService.MoveUpMediaInUserGalleryAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event MoveUpMediaInUserGalleryCompleted(ByVal sender As Object, ByVal e As MoveUpMediaInUserGalleryCompletedEventArgs) Implements IPartnerService.MoveUpMediaInUserGalleryCompleted

#End Region

#Region "MoveDownMediaInUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Move a media down in an user gallery.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        Public Function MoveDownMediaInUserGallery(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String) As Boolean Implements IPartnerService.MoveDownMediaInUserGallery
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If

        ''' <summary>
        ''' Moves down media in user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub MoveDownMediaInUserGalleryAsync(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String, ByVal userState As Object) Implements IPartnerService.MoveDownMediaInUserGalleryAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event MoveDownMediaInUserGalleryCompleted(ByVal sender As Object, ByVal e As MoveDownMediaInUserGalleryCompletedEventArgs) Implements IPartnerService.MoveDownMediaInUserGalleryCompleted

#End Region

#Region "MoveMediaToTopInUserGallery"
#If SILVERLIGHT = 0 Then
        ''' <summary>
        ''' Move a media to top in an user gallery.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Function MoveMediaToTopInUserGallery(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String) As Boolean Implements IPartnerService.MoveMediaToTopInUserGallery
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Function
#End If


        ''' <summary>
        ''' Moves to top media in user gallery async.
        ''' </summary>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="mediaId">Existing media ID.</param>
        ''' <param name="galleryId">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="userState">The user state object.</param>
        ''' <remarks></remarks>
        Public Sub MoveMediaToTopInUserGalleryAsync(ByVal sessionId As String, ByVal mediaId As Integer, ByVal galleryId As String, ByVal userState As Object) Implements IPartnerService.MoveMediaToTopInUserGalleryAsync
            Contract.Requires(Of ArgumentNullException)(Not String.IsNullOrEmpty(sessionId), "SessionId must be not null.")
            Throw New NotImplementedException()
        End Sub

        Public Event MoveMediaToTopInUserGalleryCompleted(ByVal sender As Object, ByVal e As MoveMediaToTopInUserGalleryCompletedEventArgs) Implements IPartnerService.MoveMediaToTopInUserGalleryCompleted

#End Region

#Region "IBaseService"
#If SILVERLIGHT = 0 Then
        Public Function Test() As Boolean Implements IBaseService.Test
            Throw New NotImplementedException()
        End Function
#End If
        Public Sub TestAsync(userState As Object) Implements IBaseService.TestAsync
            Throw New NotImplementedException()
        End Sub

        Public Sub GetDataAsync(userState As Object) Implements IBaseService.GetDataAsync
            Throw New NotImplementedException()
        End Sub
#If SILVERLIGHT = 0 Then
        Public Function GetData() As FotoliaData Implements IBaseService.GetData
            Throw New NotImplementedException()
        End Function
#End If

        Public Event GetDataCompleted(sender As Object, e As EventArgs.GetDataCompletedEventArgs) Implements IBaseService.GetDataCompleted

        Public Event TestCompleted(sender As Object, e As EventArgs.TestCompletedEventArgs) Implements IBaseService.TestCompleted
#End Region

    End Class
End Namespace
